﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BCDto.Sim.Admin.AdminSpecificPermission;
using BCService.Sim.Admin.AdminSpecificPermissionService;
using Microsoft.AspNetCore.Mvc;

namespace BCTMSRESTful.Controllers.Management.Admin.AdminPermission
{
    /// <summary>
    /// 管理员特殊权限控制器
    /// </summary>
    [ApiExplorerSettings(GroupName = "Admin")]
    [Route("api/v1/sim/[controller]")]
    public class AdminSpecificPermissionController : ManagementBaseController
    {
        private readonly IAdminSpecificPermissionService adminSpecificPermissionService;

        public AdminSpecificPermissionController(IAdminSpecificPermissionService adminSpecificPermissionService)
        {
            this.adminSpecificPermissionService = adminSpecificPermissionService;
        }

        #region 获取管理员特殊权限列表（全部）
        /// <summary>
        /// 获取管理员特殊权限列表（全部）
        /// </summary>
        /// <response code="200">获取管理员特殊权限列表</response>
        /// <returns></returns>
        [HttpGet]
        [ProducesResponseType(typeof(List<AdminSpecificPermissionDto>), 200)]
        [Obsolete]
        public IActionResult Get()
        {
            return this.Ok(adminSpecificPermissionService.List());
        }

        #endregion
    }
}
